//
//  HourIncomeView.swift
//  TinyShopKeeper
//
//  Created by rimi on 16/6/6.
//  Copyright © 2016年 yuying. All rights reserved.
//

import UIKit


let HourIncomeView_Width:CGFloat = 82
let PointButton_Width:CGFloat = 32


class HourIncomeView: UIView {

     //
    var pointview:PointView! = {
        let view = PointView(frame:CGRectMake(0,0,HourIncomeView_Width,40))
        return view
    }()
    
    //时间label
    let timeLabel:UILabel! = {
        let label = UILabel(frame: CGRectMake(0,0,HourIncomeView_Width,20))
        label.textAlignment = .Center
        label.textColor = UIColor.grayColor()
        return label
    }()
    
    //收入label
    let incomeLabel:UILabel! = {
        let label = UILabel(frame: CGRectMake(0,0,HourIncomeView_Width,50))
        label.textAlignment = .Center
        label.textColor = ApplicationTintColor
        label.numberOfLines = 2
        return label
    }()

    
    
    //MARK:--LifeCycle
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        addSubview(pointview)
        addSubview(timeLabel)
        addSubview(incomeLabel)
        backgroundColor = UIColor.clearColor()
        
        timeLabel.center = CGPointMake(HourIncomeView_Width/2, CGRectGetHeight(self.frame) - 15)
    }

    //如果当前的view在故事模板中或者在xib中 会调用此方法去初始化
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
